<template>
    <panel :class="$style.panel" title="生活服务">
        <ul :class="$style.content">
            <li :class="$style.item" v-for="item in enters" :key="item.title">
                <img :src="item.img" alt="item.title">
                <p>{{item.title}}</p>
                <p v-if="item.newMsg">{{item.newMsg}}</p>
            </li>
        </ul>
    </panel>
</template>

<script>
import Panel from '../core/panel.vue'
export default {
    components: {
        Panel
    },
    data() {
        return {
            enters: [
                {
                    href: 'Home',
                    img: '//img12.360buyimg.com/jrpmobile/jfs/t3991/64/2521945388/12110/93c0139/58d1e462Ncf294123.png?width=132&height=132',
                    title: '优惠券'
                },
                {
                    href: 'Home',
                    img: '//img12.360buyimg.com/jrpmobile/jfs/t5590/252/875247023/17343/946aa72c/59224650N0f7ffc92.png?width=132&height=132',
                    title: '领福利',
                    newMsg: '全新升级'
                },
                {
                    href: 'Home',
                    img: '//img12.360buyimg.com/jrpmobile/jfs/t4393/329/2180608902/13217/c88c0cec/58ec9dcdN1534e2d7.png?width=132&height=132',
                    title: '抢钢镚'
                },
                {
                    href: 'Home',
                    img: '//img12.360buyimg.com/jrpmobile/jfs/t5488/298/1036263348/12073/b4f4de97/590ac8e8Ne9def22e.png?width=135&height=135',
                    title: '白条提额'
                },
                {
                    href: 'Home',
                    img: '//img12.360buyimg.com/jrpmobile/jfs/t1/520/34/950/3686/5b9239e3Eaaf5465c/8d8c35badacfc114.png?width=90&height=90',
                    title: '工资理财'
                }
            ]
        }
    }
}
</script>

<style lang="scss" module>
    @import "../../css/element.scss";
    .panel{
        @include panel;
        .content{
            @include flex(row);
            box-sizing: border-box;
            text-align: center;
            padding-bottom: 40px;
            .item{
                width: 20%;
                img{
                    width: 90px;
                    height: 90px;
                }
                p{
                    font-size: 26px;
                    color: #666;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    white-space: nowrap;
                    margin-top: 12px;
                    &:nth-child(3){
                        color: #ff801a;
                    }
                }
            }
        }
    }
</style>